package com.itheima.test;

public class Demo01 {//实现买票案列

    public static void main(String[] args) {
        //创建参数
        Ticket ticket = new Ticket();
        //创建线程
        Thread t1 = new Thread(ticket);
        Thread t2 = new Thread(ticket);
        Thread t3 = new Thread(ticket);
        //命名
        t1.setName("窗口一");
        t2.setName("窗口二");
        t3.setName("窗口三");
        //开启线程
        t1.start();
        t2.start();
        t3.start();
    }
}
